<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>动态</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <script type="text/javascript">
   		function changeImage(){
   			element=document.getElementById("image");
   			if(element.src.match("one")){
   				element.src="../images/two.jpg";
   			}else{
   				element.src="../images/one.jpg";
   			}
   			document.getElementById("le").style.color="#f00";  //对html标签修改样式
   		}
   </script>
  </head>
  
  <body>
   <img id="image" onclick="changeImage()" src="../images/one.jpg" width="480px" height="360px">
   <p id="le">请点击灯泡控制开关</p>
  </body>
</html>
